package springmvc.service.impl;

import springmvc.bean.Homework;
import springmvc.bean.Student;
import springmvc.bean.Student_homework;
import springmvc.dao.StudentHomeworkJdbc;
import springmvc.service.DbService;

import java.util.List;

public class DbServiceImpl implements DbService {


    @Override
    public List<Student_homework> select_all() {
        return StudentHomeworkJdbc.select_all();
    }

    @Override
    public String getPassword(String account) {
        return StudentHomeworkJdbc.getPassword(account);
    }

    @Override
    public List<Homework> get_student_homework(String account) {
        return StudentHomeworkJdbc.get_student_homework(account);
    }

    @Override
    public void insert_student_homework(String account, String homework_id, String content, String title) {
        StudentHomeworkJdbc.insert_student_homework(account,homework_id,content,title);
    }

    @Override
    public List<Homework> get_all_homework() {

        return StudentHomeworkJdbc.get_all_homework();
    }

    @Override
    public List<Student> get_all_student() {

        return StudentHomeworkJdbc.get_all_student();
    }

    @Override
    public void add_homework(String title, String homework_id) {
        StudentHomeworkJdbc.add_homework(title,homework_id);
    }

    @Override
    public void add_student(String id, String name, String age, String tel) {
        StudentHomeworkJdbc.add_student(id,name,age,tel);
    }

}
